Q42: What does the gas usage in a transaction depend on?

A. The number of state variables

B. The amount of storage

C. The complexity of algorithms

D. All of above

Q43: Which among the following is the default storage for the state

variables?

A. Storage

B. Memory

C. Stack

D. Calldata

Q44: Which among the following is the default storage for the local

variables in a function?

A. Storage

B. Memory

C. Stack

D. Calldata

Q45: What is the cause of error in the following code?

// SPDX-License-Identifier: SOME IDENTIFIER

pragma solidity ^0.8.10;

contract StorageMemory {

function saveInMemory() public {

uint memory varStorage1 = 0;

uint memory varStorage2 = 0;

}

}

A. No issues at all. The code will compile, get deployed, and run

B. The code would run but would consume a lot of gas